package com.up.upzl.biz.common;

public class UpResult {
	public final static Integer SUCCESS = 200;// 操作成功
	public final static Integer PARAM_EXCEPTION = 300; // 参数异常
	public final static Integer NO_RESULT = 400;// 查询结果为空
	public final static Integer EXCEPTION = 500;// 异常引起的操作失败

	// 响应业务状态
	private Integer status;

	// 响应消息
	private String msg;

	// 响应中的数据
	private Object data;

	public static UpResult build(Integer status, String msg) {
		return new UpResult(status, msg, null);
	}

	public UpResult(Integer status, String msg, Object data) {
		this.status = status;
		this.msg = msg;
		this.data = data;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
